﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HangfireTaskDemo
{
    public interface ITestMainService
    {
        Task ExecuteAsync(string msg);
    }

    public class TestMainService : ITestMainService
    {
        private readonly ITestSubService _testSubService;
        public TestMainService(ITestSubService testSubService)
        {
            _testSubService = testSubService;
        }

        public async Task ExecuteAsync(string msg)
        {
            var subMsg = await _testSubService.GetDataAsync();
            Console.WriteLine($"入口服务{msg}；{subMsg}");
        }
    }
}
